package com.lcxw.hxzbadmin.dao.adminmapper;
import	java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import com.lcxw.hxzbadmin.entity.pojo.AnchorLevel;

public interface AnchorLevelMapper {

    @Delete({
        "delete from ywpd_anchorlevel",
        "where levelId = #{levelId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer levelId) throws Exception;

    @Insert({
        "insert into ywpd_anchorlevel (levelId,`name`, ",
        "`min`, `max`)",
        "values (#{levelId}, #{name}, ",
        "#{min}, #{max})"
    })
    int insert(AnchorLevel record)throws Exception;

    @Select({
        "select",
        "*",
        "from ywpd_anchorlevel",
        "where levelId = #{levelId,jdbcType=INTEGER}"
    })
    AnchorLevel selectByPrimaryKey(Integer levelId)throws Exception;

    @Update({
        "update ywpd_anchorlevel",
        "set `name` = #{name},",
        "`min` = #{min},",
        "`max` = #{max}",
        "where levelId = #{levelId}"
    })
    int updateByPrimaryKey(AnchorLevel record)throws Exception;

    @Select("SELECT * FROM ywpd_anchorlevel")
    List < AnchorLevel> selectAll()throws Exception;
}
